All Questions
Tagged with ruby-on-railsruby-on-rails-3.2
4,422 questions
0votes
1answer
50views
(Ruby on Rails validates_confirmation_of) How to switch error message to the confirmation field?
In Ruby on Rails 3.2, I am trying to validate password confirmation with this: validates_confirmation_of :password Rails will add the validation error to the :password field. How do I make the ...
0votes
2answers
830views
Update record in before_destroy and prevent its destruction
I am using Rails 3.2, Ruby 1.9.3. I need to prevent a record from being destroyed and update it in the before_destroy callback. Given two classes with the following associations class Course: ...
0votes
1answer
580views
Ruby on Rails: pass query parameters hash with key but nil value
In Ruby on Rails, my current url has a query parameter of ?hello. Since the request.query_parameters hash will be {:hello=>nil}, how do I pass this with link_to? Rails seems to drop any query ...
0votes
1answer
83views
Access value from multidimensional Hash rails
I have to access the id and other important information of each operator. The structure of given data is: {:items=> [{:id=>"868f136b-ec4e-4794-a3a9-a70d4b83ab38", :clientId=>&...
1vote
3answers
2kviews
Mysql2 error in starting rails server in mac m1
I have installed mysql2 in mac m1 using the below command gem uninstall mysql2 gem install mysql2 -v '0.3.21' -- --srcdir=/usr/local/Cellar/mysql/8.0.28_1/bin/include --with-mysql-include=/usr/local/...
0votes
1answer
3kviews
bundle update --conservative devise does not update only "devise" gem
I recently tried to update devise to the latest version specified in the gemfile without affecting its dependencies. gemfile.lock: devise (3.5.3) bcrypt (~> 3.0) orm_adapter (~> 0.1) ...
1vote
1answer
232views
Pundit gem error class overriding my custom error class in ruby
my application has custom error classes defined lib/error/* example #lib/error/custom_error.rb module Error class CustomError < StandardError attr_accessor :error, :status, :message ...
0votes
0answers
28views
Rails 4 AR .select includes pk field in result even if result is grouped (as opposed to Rails 3.2)
I'm migrating my app from Rails 3.2 to 4.0, and I'm finding a number of broken tests because Rails 4 includes the PK field (usually 'id') in the result set when using something like: Invoice.where(...
0votes
0answers
135views
uninitialize constant user (work with dto)
I'm learning rails using Devise for authentication purpose and make a User by Rails generate Devise user it creates a user model for me & every thing is works fine But when i put my file (user.rb)...
0votes
0answers
60views
Problem deleting server side cookies in Controller
For an application, I need to remove two server-side generated cookies if the User has selected to not allow cookies. I can detect the cookies, get the consent settings, and everything just fine. ...
1vote
1answer
228views
heroku push of Rails 3.2 app suddenly fails with "Could not detect rake tasks" (no other errors)
I changed nothing in the configuration (no new gems or version changes); just one line of code, but I am now unable to push to heroku. Something must have changed at heroku? It is Rails 3.2.22.5; ...
0votes
0answers
233views
RAILS 3.2.2.1 > rails assets:precompile LoadError: cannot load such file -- net/ssh/config
rails version 3.2 ruby version 2.0.0 -p451 I'm executing: rails assets:precompile --trace Getting the below error. rake aborted! LoadError: cannot load such file -- net/ssh/config /home/hardik/...
0votes
2answers
296views
Rails find_by new column
I am new to rails , I have added a new column “control_id” in a table users and same is added in model file under attr_accessible :control_id But when I use find_by_control_id(1) . I am getting ...
0votes
1answer
390views
Possible to delete all Rails session info for all users
I am working on a legacy Rails 3.2 app and would like to log everybody out and have their _app_session be reset with the secure flag set to true. It seems like either changing our session_store ...
0votes
0answers
55views
Exposing assets in development and production in Rails 3.2
I have a legacy Rails 3.2 app and if I have a JavaScript file at: app/assets/javascripts/jt.js I'm able to access it at https://dev-platform.domain.com/assets/jt We are using the asset pipeline and ...